package cn.getech.data.development.service;

import cn.getech.data.development.entity.TablePartitionStatistics;
import cn.getech.data.development.model.vo.TablePartitionStatisticsVO;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

public interface TablePartitionStatisticsService extends IService<TablePartitionStatistics> {

    /**
     * 获取数据总量排名
     *
     * @param tableId
     * @param sort    desc：按总量大到小排列，asc：按总量小到大排列
     * @return
     */
    List<TablePartitionStatisticsVO> sizeTopTenRanking(Integer tableId, Integer sort);

    /**
     * 批量插入或更新
     */
    void batchSaveOrUpdate(List<TablePartitionStatistics> entityList);

    List<TablePartitionStatisticsVO> selectPartitionStoreList(Integer id, String unit);
}

